package com.example.day45.surface;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

/**
 * @author zhangwei
 * @version V1.0
 * @Title: Advanced
 * @Package com.example.day45.surface
 * @Description:
 * @date 15/10/29 上午10:20
 */

public class MyView extends View {
    private Paint paint = new Paint();


    public MyView(Context context) {
        super(context);
    }

    public MyView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
    }

    private class DrawTask extends Thread {
        private Canvas canvas;

        public DrawTask(Canvas canvas) {
            this.canvas = canvas;
        }

        @Override
        public void run() {
            canvas.drawLine(50, 500, 50, 50, paint);
        }
    }


}
